package feedback;

import util.Entity;
import exceptions.NotAValidRateGivenException;

/**
 * A given score. Its maximum is 5 points.
 */
public class Rate extends Entity {

    private static final long serialVersionUID = 1L;

    private int score;

    public Rate() {
        super();
        // empty constructor
    }

    public Rate(final int aScore) {
        super();
        if (aScore > 5 || aScore < 0) { // el 5 podria ser configurable
            throw new NotAValidRateGivenException("el puntaje debe estar entre 0 y 5");
        }
        this.score = aScore;
    }

    public void setScore(final int score) {
        this.score = score;
    }

    public int getScore() {
        return this.score;
    }

}
